package serivce;

import dao.AdminDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import untity.BriefHouse;
import untity.User;

import java.util.List;

@Service
public class AdminImp implements Adminserivce{

    @Autowired
    private AdminDao adminDao;

    @Override
    public List<User> getAllUser() {

        return adminDao.getAllList();
    }

    @Override
    public List<BriefHouse> getAllHouse() {

        return adminDao.getAllHouse();
    }

    @Override
    public void houseDelete(String id) {
        adminDao.houseDelete(id);
        adminDao.deletePosition(id);
    }

    @Override
    public void userDelete(String id) {
        adminDao.userDelete(id);
    }
}
